Skip to content

Add batch cancel, enriched events, and partial fill improvements#4

Open
z0r0z wants to merge 2 commits into
ETHCF:mainfrom
z0r0z:partial
Open

Add batch cancel, enriched events, and partial fill improvements#4
z0r0z wants to merge 2 commits into
ETHCF:mainfrom
z0r0z:partial

Conversation

@z0r0z
Copy link
Copy Markdown

@z0r0z z0r0z commented Apr 16, 2026

Summary

  • Batch cancel support: cancelOrders and cancelOrdersUnwrap
  • Enriched events: all fill/cancel events now include maker, tokenA, tokenB
  • Clean state on full fill: zero out amountA/amountB for storage refunds
  • Early active checks on ETH fill paths for correct error messages
  • DRY refactors: _emitFillEvent, _cancelOrder, _cancelOrderUnwrap
  • Solidity ^0.8.34, optimizer runs 9,999,999

Test plan

  • 188 unit/fuzz tests passing
  • 8 invariant tests passing
  • 22 new tests added

🤖 Generated with Claude Code

…events

- Zero out amountA/amountB on full fill for clean state and storage refunds
- Add early active checks in fillOrderWithEth and fillOrderUnwrap for correct error messages
- Extract _emitFillEvent helper to eliminate duplicated emit logic across 3 fill paths
- Add cancelOrders and cancelOrdersUnwrap for batch cancel support
- Extract _cancelOrder and _cancelOrderUnwrap internals for DRY batch/single paths
- Enrich OrderFilled and OrderPartiallyFilled events with maker, tokenA, tokenB for indexer parity
- Enrich OrderCanceled event with maker, tokenA, amountA
- Pin Solidity pragma to ^0.8.34 (avoids transient storage clearing bug in <=0.8.33)
- Bump optimizer runs to 9,999,999 for maximum runtime gas efficiency
- Add .claude-skills/ to gitignore
- Add 22 new tests covering batch cancel, zeroed state, early active checks, and enriched events

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

@z0r0z is attempting to deploy a commit to the ETHCF Team on Vercel.

A member of the Team first needs to authorize it.

@z0r0z z0r0z changed the title Harden Swapboard for deployment Add batch cancel, enriched events, and partial fill improvements Apr 16, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant